|
|
Preventing Self-Intersection
Overview
Without any special constraints, a flag is free to intersect itself as it flaps around. This section will demonstrate how you can use the Prevent Self-Intersection parameter to add realism to your flag's animation.
A Demonstration Of Self-Intersection
Let's say you have a flag flapping in the wind, and the wind dies down, but then it picks up again. The flag will droop as the wind subsides, but it will begin undulating again once the wind speed increases. We'll see that such a scenario can cause self-intersection.
- Open the "Intersection.aep" project. This scene has a Swedish flag with an animated Wind Speed parameter. The wind dies down and then picks up. As this happens, we'll see that the flag intersects itself.

- Set the time marker to time 0:20 (the 20th frame, less than 1 second).

Notice the self-intersection. As the wind dies down, the flag droops, causing the flag to overlap itself.
- To see the animation in action, open the Options window by clicking the 3D Flag logo in the Effect Controls window.

Watch the animation play. Press the Restart Simulation button to start the animation over. You can see several frames where the flag intersects itself.
- Once you've finished viewing the animation, press the OK button to close the Options window.
Removing Self-Intersection
To fix the self-intersection problem, we'll use the Prevent Self-Intersection parameter.
- Select the "Intersection Flag" layer in the Timeline window.
- Open the Effect Controls window (Effect> Effect Controls) for that layer.
- Find the Prevent Self-Intersection parameter at the bottom of the Effect Controls window and select "On."

The scene will recalculate, and then the Comp window will show that the flag no longer intersects itself.

- Open the Options window to view the new animation.
NOTE: Since Prevent Self-Intersection is on, the Options window will display the animation in Frame-By-Frame mode. It will also play slower than normal, since it requires extra CPU power to do the self-intersection calculations.
When you're done viewing the animation, press the OK button to close the Options window.
The Prevent Self-Intersection parameter can be used to fix situations where a flag intersects itself. While using the parameter can solve many of your self-intersecting problems, it may not fix every situation, as you'll see in the next section, Advantages And Limitations.
|